import ProForm, {ProFormDigit, ProFormRadio, ProFormText } from '@ant-design/pro-form';
import { Modal } from 'antd';


const Create = (props) => {

  const {isModalVisible} = props;
  const {isShowModal} = props;
  const {func} = props;


  return (
    <Modal
      title="新建"
      visible={isModalVisible}
      footer={null}
      onCancel={() => isShowModal(false)}
      destroyOnClose={true}
    >
      <ProForm onFinish={values => func(values)}>
        <ProFormText width="md" name="name" label="Name"/>
        <ProFormText.Password width="md" name="password" label="Password"/>
        <ProFormDigit width="md" name="age" label="Age"/>
        <ProFormRadio.Group
          name="gender"
          label="Gender"
          radioType="button"
          options={[
            {
              label: '男',
              value: '男',
            },
            {
              label: '女',
              value: '女',
            }
          ]}
        />
      </ProForm>

    </Modal>
  );
};

export default Create;
